from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from . import views

urlpatterns = [
    url(r'^users/$', views.RegisterView.as_view()),
    url(r'^sms_codes/(?P<mobile>\d+)/$', views.SMSCodeView.as_view()),
    url(r'^user/$', views.UserCenterInfo.as_view()),
    url(r'^introduce/$',views.IntruduceCompleteView.as_view()),
    url(r'^avatar/$',views.AvatarView.as_view()),
    url(r'^exp_detail/$', views.UserExpView.as_view()),
    url(r'^authorizations/$', obtain_jwt_token),
    url(r'^account/(?P<user_id>\d+)/$', views.AccountSettings.as_view()),
    url(r'^accounts/(?P<user_id>\d+)/$', views.AccountDtailSettings.as_view()),
    url(r'^company/(?P<user_id>\d+)/$', views.CompanySettings.as_view()),
    url(r'^school/(?P<user_id>\d+)/$', views.SchoolSettings.as_view()),
    url(r'^edit/(?P<user_id>\d+)/$', views.UserEditSettins.as_view()),
    url(r'^exp/$', views.EducationViewSet.as_view({'post': 'create'})),
    url(r'^exps/(?P<id>\d+)/$', views.EducationViewSet.as_view({'patch': 'update'})),
    url(r'^user/dynamics/$', views.DynamicsListView.as_view()),  # 个人动态
    url(r'^user/attentions/questions/$', views.UserAttentionsQuestionsView.as_view()),  # 用户关注问题
    url(r'^user/attentions/labels/$', views.UserAttentionsLabelsView.as_view()),  # 用户关注标签
    url(r'^user/collections/tucaos/$', views.UserCollectTucaosView.as_view()),  # 用户收藏吐槽
    url(r'^user/answers/$', views.UserAnswersView.as_view()),  # 我的回答
    url(r'^user/questions/$', views.UserQuestionsView.as_view()),  # 我的提问
]
